<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    html, body {
      width: 100%;
      height: 100%;
    }
  </style>
</head>
<body>
<div id="myChart" class="chart2" style="width:100%; height:100%;"></div>
</body>
<script src="../js/china.js"></script>
<script src="../js/echarts.min.js"></script>
<script src="../js/jquery.min.js"></script>
<script>
  var chart1 = null;
  $(function () {
    chart2 = echarts.init($(".chart2").get(0));
  });
  setTimeout(function () {
    option = {
      title: {
        text: '| 游客到访频次分析',
        subtext: '',
        textStyle: {
          color: '#057bff'
        },
      },
      tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      legend: {
        orient: 'vertical',
        left: 'left',
        data: []
      },
      series: [
        {
          name: '',
          type: 'pie',
          radius: '20%',
          center: ['50%', '50%'],
          data: [
            {value: 335, name: '半天', itemStyle: {color: '#4b7efe'}},
            {value: 310, name: '1天', itemStyle: {color: '#fec400'}},
            {value: 234, name: '3-4天', itemStyle: {color: '#fc7600'}},
            {value: 135, name: '4-6天', itemStyle: {color: '#4ad970'}},
            {value: 1548, name: '2-3天', itemStyle: {color: '#36d9fc'}}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    chart2.setOption(option);
  });
</script>
</html>
